from django.db import models


# Create your models here.

class App(models.Model):
    mark = models.CharField(max_length=200, primary_key=True)
    name = models.CharField(max_length=200)
    kafka = models.CharField(max_length=200)

    class Meta:
        db_table = 't_app'  # 指明数据库表名
        verbose_name = '应用'  # 在admin站点中显示的名称
        verbose_name_plural = verbose_name  # 显示的复数名称
        permissions = (
            # (权限，权限描述),
            ('customize_permission', 'This is my customize permission'),
        )

    def __str__(self):
        """定义每个数据对象的显示信息"""
        return f'{self.name}({self.mark})'
